mob
	var
		Pause
		Locked
		Red
		Green
		Blue
		Gender = "male"
		cheater
		Bad
		LStr
		LCons
		LDex
		LAvail
		LInt
		bcity

		 // seen the farm form?
		showhiddenmenu // duh

		indungeon
		dungeonlevel // needs to be included
		ClickedNew //Prevents massive sending of the Login Form
		//modes for clicks!
		modeteleoport
		modefiresomething
		list/hudspells[10]
		dead   //duh
		canNewLoad  //Can the player use F2 at the moment?
		savable = 0//Should the player be saved?
		areain

		RPS_wins
		RPS_loses
		RPS_games


		attack // Currently holds links to an attack proc
		bumpedX

//Combat(mostly)-Related Variables
		AvailablePoints = 50 // Comments say 100, but 50 is closer to the compiled game.
		Str = 45
		Con = 45
		Int = 45
		Dex = 45

		hp = 10 /* review */
		mp = 5 /* These may be incorrect. Agree with source code, possibly not with actual game */
		maxhp = 10
		maxmp = 5

// Some weird stuff that will go here for now. Partly combat-related.

/*		Energy = 100 //The Energy var used for the dungeon movement, and battle systems
		MaxEnergy = 150 //The MaxEnergy var. This is the max Energy can charge up to. Mainly to make lag less of a problem.
		Speed = 100 //The amount of Energy required to make a move. This will differ between monsters and players
		EnergyPerTick = 10 //The amount of Energy a mob gains every tick. This may be altered to every two ticks, some other number, etc

Code No Longer Used
*/

		stealth // how easy is it for a monster to stop thou
		lawful= 1 // Foomers version of saying who's side your on -1 = monster. 1 = player
		missile_delay // Errr...

	Move()
		src.UpdateLevelController()
		if(src.Locked)
			return 0
		else
			src.UpdateTurnController()
			src.Locked = 1
			sleep(src.Pause)
			.=..()
			src.Locked = 0

mob/pc // Monsters can bump players too
	Bump(M)

		if(istype(M,/turf/es/door))
			var/turf/es/door/T = M
			if (bumpedX >= 1)
				T.Use() // We know it is that from the istype.
			else bumpedX ++

		if(istype(M, /mob/pc))
			src.bumpedX++
			if (bumpedX >= 5)
/*				var/turf/turfto = get_step(M,src.dir)
				if(turfto.density)
					turfto =  get_step(M,turn(dir, +90))
					if(turfto.density)
						turfto =  get_step(M,turn(dir, -90))
						if(turfto.density)
							turfto = M.loc
							M.loc = src.loc
				src.loc = turfto
*/
				var/mob/pc/N = M
				src.loc = N.loc // we *know* it is a /mob/pc!
				var/turf/turfto = get_step(N,src.dir)
				while(turfto.density)
					dir = turn(dir, -45)
					turfto =  get_step(src,dir)
				src.loc = turfto
				bumpedX = 0
			else
				if(istype(src, /mob/pc))
					var/mob/pc/X = src
					spawn X.Remove_bump() // *sigh*


mob
	pc
		var
			cSpecialAttacks // A Count(number) of the special attacks that the player has
			list/rgspecialattack = list() // A list containing the player's special attacks
			PATTACK/pattack = new() // A datum containing info in the player's attack
			todam // A damage modifier???
			tohit // A hit likelyhood modifier???
			level = 1 // What level is the player?
			experience // How much experience points do they have?
			experienceMax // Not sure what this is for yet. ???

			list/rgattrib[pattribMax]
			AVMod // ???
			ac // Player's current armor value. Recalc this everytime something is equipped/unequipped

mob
	pc
		icon = 'pc npc.dmi'
		icon_state = "m"
		var
			Poisoned = 0
			seenfarm
			burn // goto burn city
			gotoV2 // completed part one?
			Muted
			mob/follower/pet
			floating // levitating


		Login() // when someone joins.
			if(ckey == "teamfourwinds")
				var/mob/newmob = new /mob/admin (null)
				var/mob/oldmob = src.client.mob
				src.client.mob = newmob
				newmob.name =src.name
				del(oldmob)

			savable = 0
			// Are they banned?


			// Are they allowed in?
			if(blockaccess)
				if(!developers.Find(src.ckey))
					admin << "<small>[src] tried to enter</small>"
					del(src)
			//inform admins they are in
			admin << "\red[src] Has logged in"
			usr.Blue = 140
			//  check if they are a developer?
			if(developers.Find(ckey))
				src.verbs += typesof(/mob/admin/verb)
				src.verbs += typesof(/mob/admin/semi/verb)
				Red = 220
				Green = 1
				Blue = 255
				showhiddenmenu = 1
				admin += src
				admin << "\red [src] added to admins"
				world << "<b>[src] has entered!</b>"
				src << {"Dont forget to check A) our <a href = "http://www.molotov.nu/Bwicki/index.dmb?CastleDocuments">Private Bwicki</a> and B) our <a href ="http://forum.maztekia.com">Forum</a>"}
			// Check if they are an admin
			if(adminslist.Find(ckey))
				src.verbs += typesof(/mob/admin/semi/verb)
				Red  =  19
				Green = 24
				Blue = 158
				showhiddenmenu = 1
				admin << "\red [src] added to semi-admins"
			//If this worked I think it could be pretty handy
//			for(var/mob/M in admin)
//				switch(alert(M,"Let in [src]?",,"Yes","No"))
//					if("No") del src
//					if("Yes") continue
			//above
			src << "[worldwelcome]"
			src.loc = locate(7,5,1)
			src.Locked = 1
			savable = 0
			..()
		Logout()
			if(pet)
				del(pet)
			src.TurnController.RemoveMob(src)
			SavePlayer(src)
			src << "[src] was saved"
			players_list -= src
			world << "<font color=[rgb(src.Red,src.Green,src.Blue)]>[src]</font> has left the realm"
			if(developers.Find(key))
				admin -= src
			del(src)

			..()
		Move()
			.=..()
			if(Poisoned)
				src.hp -= Poisoned
		DblClick()
			var/turf/T = src.loc
			if(istype(T,/turf/es/stairs))
				var/turf/es/stairs/T2 = T
				T2.Use(src) // WE KNOW DAMMIT! I hate this compiler sometimes.
			else
				return
		Bump(atom/A)
			. = ..()
			if(istype(A, /mob/monster))
				if(src.TurnController.Action(src))
					src.DoPlayerAttack(A)





	MouseDrag(atom/M,turf/Y,turf/T)
		if(isturf(Y) && isturf(T))
			if(!Y.density)
				if(istype(src,/mob/pc))
					if(!T.density)
						if (usr == src)
							walk_to(src,T,0,2)
/*
cotw should just be: If they dont have a save, make
one. If they do, offer to load it for them. If they do,
have an option to delete. Always have new char*/





/* Some player-related stuff from the CotW code
/** Game Difficulty Defines */
typedef struct tagParams
	{
	WORD cMonPerDiff;
	WORD cTrapPerDiff;
	WORD MTHBonusPerDiff;
	WORD PTHPenaltyPerDiff;
	WORD PercentTreasurePerDiff;
	WORD PercentMarkupPerDiff;
	WORD PercentExpPerDiff;
	WORD ExpDelta;
	WORD PercentMarkdownPerDiff;
	}	PARAMS;
extern PARAMS params;
// Defaults:
#define cMonPerDiffDefault				5
#define cTrapPerDiffDefault				4
#define	MTHBonusPerDiffDefault			0
#define PTHPenaltyPerDiffDefault		0
#define PercentTreasurePerDiffDefault	20
#define PercentMarkupPerDiffDefault		0
#define PercentExpPerDiffDefault		0
#define ExpDeltaDefault					10
#define PercentMarkdownPerDiffDefault	10


/* character defines */
#define	chSpace		' '
#define chEsc		0x1b
#define chEnter		0x0d

#ifdef DEBUG
#define Assert( x, y)	if ( x ) ; else AssertProc(y, __FILE__, __LINE__)
#define AssertDo( x, y) if ( x ) ; else AssertProc(y, __FILE__, __LINE__)
#else
#define Assert( x, y)
#define AssertDo( x, y) ( x )
#endif

#define sign(x)	( ((x) > 0) ? 1 : ((x) < 0) ? -1 : 0)
#define FOREVER 	for(;;)

#define dirNorth			0
#define dirNorthEast		1
#define dirEast				2
#define dirSouthEast		3
#define dirSouth			4
#define dirSouthWest		5
#define dirWest				6
#define dirNorthWest		7

#define	statHP		0x0
#define statMana	0x1
#define statSpeed	0x2
#define statTime	0x3
#define statDungeonLevel		0x4
#define statMac		0x5

#define cstatMax	0x4
	/* max of items in stat array in player struct */
#define STRENGTH		0x0
#define INTELLIGENCE 	0x1
#define CONSTITUTION 	0x2
#define DEXTERITY		0x3
#ifdef DEBUG
/* these are used just for the Change Globals dialog */
#define HP				0x4
#define MANA			0x5
#define LEVEL			0x6
#define AC				0x7
#define TOHIT			0x8
#define TODAM			0x9
#define GOLD			0x10
#endif
struct PLAYER {
/* 0-3 */	STAT statMax[ cstatMax];	/* nominal stat */
			/* current stat = Max + DeltaPerm + + DeltaObj + DeltaTemp limited to [0,100] */
/* 4-7 */	STAT statCur[ cstatMax];
			/* Permanent deltas (special drains, potions, etc.) These are restorable only by church */
/* 8-11 */		STAT statDeltaPerm[ cstatMax];
			/* Temporary deltas (temp drains, etc.) These are restorable via time or restoration potions */
/* 12-15 */		STAT statDeltaTemp[ cstatMax];
			/* object deltas (rings, swords, etc.) These are not restorable */
/* 16-19 */	STAT statDeltaObj[ cstatMax];
/* 20-21 */	int hp;
/* 22-23 */	int hpMax;
/* 24-25 */	int mana;
/* 26-27 */	int manaMax;
/* 28-29 */	int level;
/* 30-33 */	long experience;
/* 34-37 */	long experienceMax;
/* 38-39 */	int	ac;
/* 40-41 */	int	tohit;
/* 42-43 */	int todam;
/* 44-45 */	WORD speed;
/* 46-47 */	WORD slow;
/* 48-49 */	WORD movespeed;
/* 50 */	unsigned fNoDraw : 1;
			unsigned fWinner : 1;
/* 50-51 */	unsigned unused : 14;
/* 52-53 */	BYTE row, col;
/* 54-55 */	BYTE rowOld, colOld;
/* 56-57 */	int cBlockAwareness;
/* 58 */	char sex;
/* 59 */	BYTE fUserIcon;
/* 60-61 */	HICON hIconPlayer;
/* 62-63 */	WORD	cSpecialAttacks;
/* 64*/		char	AVMod;
/* 65 */	char	unused2;	// to balance AVMod
/* 66-67 */	int		hpDrain;	// vampire drains
/* 68-69 */	int		manaDrain;	// ??? drains
/* 70-96 */	BYTE	mpTfFSeen[TF_MACEITHER];	// Largest of TF_MAC in either game
/* 97-127 */	char unused3[31];
	};
#define MALE	0	/* player sex */
#define FEMALE	1

#define AVMODPERATTACK 10 // This has been placed in _defines.dm

/* attribute defines for player */ // This has been placed in _defines.dm
#define pattribNil			-1
#define pattribRFlame		0
#define pattribRCold		1
#define pattribRLightning	2
#define pattribRAcid		3
#define pattribRFear		4
#define pattribRDrainLife	5
#define pattribRConfusion	6
#define pattribRNormalDamage	7
#define pattribRPoison			8
#define pattribRDisease			9
#define pattribRMagic			10
#define pattribLevitation	11
#define pattribBlindness	12
#define pattribConfusion	13
#define pattribFear			14
#define pattribStealth		15
#define pattribHeroism		16
#define pattribDisplacement	17
#define pattribInvisibility	18
#define pattribLeague		19
#define pattribTrueSight	20
#define pattribDetectMonsters	21
#define pattribParalized		22
#define pattribMax			32		/* leave some room to grow */

*/
